package com.itheima.readDemo;

import java.io.File;

public class Chapter {

    //章节序号
    private Integer id;
    private String chapterTitle;
    private File chapterFile;
    private String url;
    private String bookId;
    private int downLoadErrorCount;

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public Integer getDownLoadErrorCount() {
        return downLoadErrorCount;
    }

    public void errorCountIncr(){
        downLoadErrorCount++;
    }
    @Override
    public String toString() {
        return "Chapter{" +
                "id=" + id +
                ", chapterTitle='" + chapterTitle + '\'' +
                ", chapterFile=" + chapterFile +
                ", url='" + url + '\'' +
                '}';
    }

    public Chapter() {
    }

    public Chapter(Integer id, String chapterTitle, File chapterFile, String url) {
        this.id = id;
        this.chapterTitle = chapterTitle;
        this.chapterFile = chapterFile;
        this.url = url;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getChapterTitle() {
        return chapterTitle;
    }

    public void setChapterTitle(String chapterTitle) {
        this.chapterTitle = chapterTitle;
    }

    public File getChapterFile() {
        return chapterFile;
    }

    public void setChapterFile(File chapterFile) {
        this.chapterFile = chapterFile;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
